package com.bainuo.doctor.common.image_support.imghandle.picker;

import android.app.Activity;
import android.content.Intent;

/**
 * Created by faraway on 15/2/17.
 */
public abstract class BasePicker implements IImagePicker {


    /**
     * 跳转相册码
     */
    protected int code;

    /**
     * 跳转的activity
     */
    protected Activity activity;

    /**
     * 监听
     */
    protected IImagePicker.Listener listener;

    /**
     * 最大图片数目
     */
    protected int maxCount = 9;

    protected boolean singleMode = false;

    @Override
    public void setCode(Activity activity, int code) {
        this.activity = activity;
        this.code = code;
    }


    @Override
    public void setSingleMode(boolean singleMode) {
        this.singleMode = singleMode;
    }

    /**
     * 设置最大图片支持数
     *
     * @param pics
     */
    @Override
    public void setMaxPictures(int pics) {
        maxCount = pics;
    }


    /**
     * 相册选择activity回调
     *
     * @param requestCode
     * @param resultCode
     * @param data
     */
    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {

    }


    /**
     * 设置选择器监听
     *
     * @param listener
     */
    @Override
    public void setPickerCompleteListener(Listener listener) {
        this.listener = listener;
    }
}
